﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ConfigureNZBLoader
{
    public partial class EditShow : Form
    {
        public EditShow()
        {
            InitializeComponent();
        }

        private string _ShowName = "";
        public string ShowName
        {
            get { return _ShowName; }
            set { _ShowName = value; }
        }

        private string _NameQuery = "";
        public string NameQuery
        {
            get { return _NameQuery; }
            set { _NameQuery = value; }
        }

        private string _DetailsQuery = "";
        public string DetailsQuery
        {
            get { return _DetailsQuery; }
            set { _DetailsQuery = value; }
        }

        private void btnNameQuery_Click(object sender, EventArgs e)
        {
            TestQueryString dlg = new TestQueryString();
            dlg.Query = txtNameQuery.Text;
            if (DialogResult.OK == dlg.ShowDialog(this))
            {
                txtNameQuery.Text = dlg.Query;
            }
        }

        private void btnDetailsQuery_Click(object sender, EventArgs e)
        {
            TestQueryString dlg = new TestQueryString();
            dlg.Query = txtDetailsQuery.Text;
            if (DialogResult.OK == dlg.ShowDialog(this))
            {
                txtDetailsQuery.Text = dlg.Query;
            }
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            ShowName = txtName.Text;
            DetailsQuery = txtDetailsQuery.Text;
            NameQuery = txtNameQuery.Text;

            DialogResult = DialogResult.OK;
            Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }

        private void EditShow_Load(object sender, EventArgs e)
        {
            txtNameQuery.Text = NameQuery;
            txtDetailsQuery.Text = DetailsQuery;
            txtName.Text = ShowName;
        }
    }
}
